
<?php
$self = $_SERVER['PHP_SELF'] . "?" . preg_replace('/[?&]lang=[^&]+$|([?&])lang=[^&]+&/', '$1', $_SERVER['QUERY_STRING']);
?>

<ul id="langMenu" class="lang-management clear right">
    <li title="Tiếng Việt" data-lang="vi">
        <a href="<?= $self ?>&lang=vi">
            <img src="<?php echo LODE_SERVER; ?>/View/resources/images/icons/flag/Vietnam.png" alt=""/>
        </a>
    </li>
    <li title="English" data-lang="en">
        <a href="<?= $self ?>&lang=en">
            <img src="<?php echo LODE_SERVER; ?>/View/resources/images/icons/flag/United-Kingdom.png" alt=""/>
        </a>
    </li>
</ul>
<script>
    $('ul#langMenu > li[data-lang|="<?= $_SESSION['lang'] ?>"]').addClass('actived');
</script>